package com.easy.service.impl;

import com.easy.bean.Receiveraddress;
import com.easy.dao.ReceiveraddressDao;
import com.easy.service.IReceiveraddressService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class ReceiveraddressService implements IReceiveraddressService {
    @Autowired
    ReceiveraddressDao receiveraddressDao;

    @Override
    public int addReceiveraddress(Receiveraddress receiveraddress) {
        return receiveraddressDao.addReceiveraddress(receiveraddress);
    }

    @Override
    public int editReceiveraddress(Receiveraddress receiveraddress) {
        return receiveraddressDao.editReceiveraddress(receiveraddress);
    }

    @Override
    public int deleteReceiveraddress(int id) {
        return receiveraddressDao.deleteReceiveraddress(id);
    }

    @Override
    public List<Receiveraddress> selectReceiveraddress(Page page, String text) {
        return receiveraddressDao.selectReceiveraddress(page,text);
    }

    @Override
    public List<Receiveraddress> getReceiveraddressById(Integer userid, Integer isdefault,Integer id) {
        return receiveraddressDao.getReceiveraddressById(userid,isdefault,id);
    }


    @Override
    public int ReceiveraddressCount(String text) {
        return receiveraddressDao.ReceiveraddressCount(text);
    }
}
